def txt_file_to_str(file_path):
    with open(file_path, 'r', encoding='utf8') as fp:
        data = fp.read()
    return data


if __name__ == '__main__':
    import os
    from submodules.common.lib.local_paths import project_path

    test_data_dir = os.path.join(project_path, "submodules", "common", "test_data")


    def test_txt_file_to_str():
        file_path = os.path.join(test_data_dir, "txt_", "test.txt")
        ret = txt_file_to_str(file_path).strip()
        print(ret)


    test_txt_file_to_str()
